/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uriu.space;

import android.view.SurfaceHolder;
import android.util.Log;

/**
 *
 * @author Jacek
 */
public class MainThread extends Thread {
    
    private static final String TAG = MainThread.class.getSimpleName();
    
   private boolean running;
   private SurfaceHolder surfaceHolder;
   private MainGamePanel gamePanel;
   
   public MainThread(SurfaceHolder surfaceHolder, MainGamePanel gamePanel)
   {
       super();
       this.surfaceHolder = surfaceHolder;
       this.gamePanel = gamePanel;
   }
   
   public void setRunning(boolean running)
   {
       this.running = running;
   }

    @Override
    public void run() {
        long tickCount = 0L;
        Log.d(TAG, "Starting game loop");
        while(running)
        {
            //update state
            tickCount++;
        }
        Log.d(TAG, "Game loop executed " + tickCount + " times");
    }
   
   
}
